package com.shrct.businessprocess.customerservice.proxy;

import com.google.gwt.user.client.rpc.IsSerializable;

public class RCContractInstallInfoStatusManager implements IsSerializable {
	public static boolean isActionValid(
			RCContractInstallInfoStatusAction action, Enum<?> state) {
		if (action == null || state == null)
			return false;
		switch (action) {
		case updateInfo: {
			return "executing".equals(state.name());
		}
		case cancel: {
			return "executing".equals(state.name());
		}
		default:
			return false;
		}
	}
}
